import 'package:auto_route/auto_route.dart';
import 'package:framework/config/route_config.dart';
import 'package:module_business/route/AppRouter.gr.dart';
import 'package:module_discover/route/discover_router.gr.dart';
import 'package:module_home/route/home_router.gr.dart';

@AutoRouterConfig()
class AppRouter extends RootStackRouter {
  @override
  List<AutoRoute> get routes => [
        AutoRoute(
          path: RouteConfig.main,
          page: MainTabRoute.page,
          children: [
            AutoRoute(
              path: RouteConfig.homePage,
              page: HomeRoute.page,
              initial: true,
            ),
            AutoRoute(
              path: RouteConfig.messagePage,
              page: MessageRoute.page,
            ),
            AutoRoute(
              path: RouteConfig.discoverPage,
              page: DiscoverRoute.page,
            ),
            AutoRoute(
              path: RouteConfig.userPage,
              page: UserRoute.page,
            ),
          ],
        ),
        AutoRoute(
          path: RouteConfig.moreManagerPage,
          page: MoreManagerRoute.page,
        ),
        AutoRoute(
            page: FilterDomainRoute.page, path: RouteConfig.filterDomainPage),
        AutoRoute(
          usesPathAsKey: true,
          page: FilterSearchRoute.page,
          path: RouteConfig.filterSearchRoute,
        ),
      ];
}
